<template>
  <div class="bokelable">
    <!-- 头部表单区域 -->
    <div class="btn-wrop">
      <el-input v-model="inputext" placeholder="请输入博客名" class="inp_text"></el-input>
      <el-button type="primary" icon="el-icon-search" class="inp_text1">查找</el-button>
      <el-button type="primary" icon="el-icon-edit" class="inp_text1">添加标签</el-button>
      <el-button type="info" icon="el-icon-document" class="inp_text1">点击量排序</el-button>
      <el-button type="info" icon="el-icon-document" class="inp_text1">引用量排序</el-button>
    </div>
    <!-- 表格区域 -->
    <el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%">
      <!-- 多选框 -->
      <el-table-column type="selection" width="55"> </el-table-column>
      <!-- 显示索引 -->
      <el-table-column type="index" label="序号" width="120"> </el-table-column>
      <el-table-column label="标签名" width="120">
        <template slot-scope="scope">{{ scope.row.date }}</template>
      </el-table-column>
      <el-table-column prop="name" label="点击数" width="120"> </el-table-column>
      <el-table-column label="排序">
        <template slot-scope="scope"
          ><el-tag type="warning">{{ scope.row.date }}</el-tag></template
        >
      </el-table-column>
      <el-table-column prop="address" label="创建时间" show-overflow-tooltip> </el-table-column>
      <el-table-column prop="address" label="更新时间" show-overflow-tooltip> </el-table-column>
      <el-table-column prop="address" label="状态" show-overflow-tooltip> </el-table-column>
      <el-table-column label="操作" show-overflow-tooltip>
        <template>
          <el-button type="primary" size="mini">置顶</el-button>
          <el-button type="warning" size="mini">编辑</el-button>
          <el-button type="danger" size="mini">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <!-- 底部分页 -->
    <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :page-sizes="[100, 200, 300, 400]"
      :page-size="100"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total"
    >
    </el-pagination>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: [
        {
          date: '2016-05-03',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
        },
        {
          date: '2016-05-02',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
        },
        {
          date: '2016-05-04',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
        },
        {
          date: '2016-05-01',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
        },
        {
          date: '2016-05-08',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
        },
        {
          date: '2016-05-06',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
        },
        {
          date: '2016-05-07',
          name: '王小虎',
          address: '上海市普陀区金沙江路 1518 弄',
        },
      ],
      multipleSelection: [],
      // 表单内容绑定
      inputext: '',
      // 数据总数
      total: 30,
    };
  },

  methods: {
    handleSizeChange(val) {
      console.log(`每页 ${val} 条`);
    },
    handleCurrentChange(val) {
      console.log(`当前页: ${val}`);
    },
  },
};
</script>

<style lang="less" scoped>
.bokelable {
  margin-top: 20px;
  .inp_text1 {
    font-size: 16px;
  }
  .inp_text {
    width: 240px;
    height: 40px;
    font-size: 16px;
    padding: 0 10px 0 15px;
  }
  .el-table {
    font-size: 14px;
  }
  /deep/ .el-table__row .el-table_3_column_19 {
    font-size: 16px !important;
  }
}
</style>
